package net.wantongtech.xa.uploadbasicinfo;

import com.wtkj.zwxt.clearing.business.dingtalk.DingTalkPushMsgService;
import lombok.extern.slf4j.Slf4j;
import net.wantongtech.xa.uploadbasicinfo.config.TollBasicInfoConfig;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@Slf4j
@SpringBootApplication
@EnableTransactionManagement(proxyTargetClass = true)
public class UploadBasicInfoApplication {


    @Bean
    public TollBasicInfoConfig tollBasicInfoConfig() {
        return new TollBasicInfoConfig();
    }

    @Bean
    public DingTalkPushMsgService dingTalkPushMsgService() {
        return new DingTalkPushMsgService();
    }

    public static void main(String[] args) {
        if (args == null || args.length == 0) {
            log.info("请输入要运行的服务");
            return;
        }

        new SpringApplicationBuilder()
                .web(WebApplicationType.NONE)
                .sources(UploadBasicInfoApplication.class)
                .build()
                .run(args);
    }

}
